package com.xinqi.common.core.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

/**
 * 新奇助手状态
 *
 * @author huangweiye
 */

public enum AssistantStateEnum {

    /**
     * 未开始
     */
    NOT_STARTED(0, "未开始"),
    /**
     * 进行中
     */
    PROGRESS(1, "进行中"),
    /**
     * 已结束
     */
    ENDED(2, "已结束"),

    /**
     * 已提交
     */
    SUBMITTED(3, "已提交"),

    /**
     * 未提交
     */
    NOT_SUBMITTED(4, "未提交"),


    /**
     * 未提交
     */
    ALLOW_SUBMISSION(5, "允许提交"),

    /**
     * 禁止提交
     */
    PROHIBIT_SUBMISSION(6, "禁止提交"),

    /**
     * 未答题
     */
    UNANSWERED(7, "未答题"),
    /**
     * 已答题
     */
    ANSWERED(8, "已答题"),

    /**
     * 已参与
     */
    PARTICIPATED(9, "已参与"),

    /**
     * 未参与
     */
    NOT_PARTICIPATED(10, "未参与"),

    /**
     * 已确认
     */
    CONFIRMED(11, "已确认"),


    /**
     * 未确认
     */
    UNCONFIRMED(12, "去确认"),

    /**
     * 已签到
     */
    SIGNED_IN(13, "已签到"),


    /**
     * 未签到
     */
    NOT_SIGNED(14, "未签到"),

    /**
     * 已学习
     */
    LEARNED(15, "已学习"),

    /**
     * 未学习
     */
    NOT_LEARNED(16, "未学习"),

    /**
     * 查看详情
     */
    VIEW_DETAIL(17, "查看详情"),

    /**
     * 查看详情
     */
    SIGN_OUT(18, "立即签出"),

    /**
     * 查看详情
     */
    LEARNING(19, "学习中");


    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    AssistantStateEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static AssistantStateEnum of(Integer code) {
        return BasicEnum.of(AssistantStateEnum.class, code);
    }
}
